import {Checkbox, Form} from 'antd'
import {omit} from 'ramda'

const FormItem = Form.Item;

const FormCheckbox = ({getFieldDecorator, initialValue, name, labelCol, label}) => {

    return (
        <FormItem
            labelCol={{span: labelCol || 0}}
            wrapperCol={{span: 24 - (labelCol||0)}}
            label={label}
        >
            {getFieldDecorator(name, {
                initialValue,
            })(<Checkbox/>)}
        </FormItem>
    )
}

export default FormCheckbox